Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add explicit type #3816

Merged
merged 2 commits into from
Sep 11, 2023
Merged

add explicit type #3816

merged 2 commits into from
Sep 11, 2023

Conversation

Copy link
Member

@armanbilge armanbilge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Just one question.

@@ -1223,7 +1223,7 @@ private[effect] trait ResourceHOInstances0 extends ResourceHOInstances1 {
implicit def catsEffectAsyncForResource[F[_]](implicit F0: Async[F]): Async[Resource[F, *]] =
new ResourceAsync[F] {
def F = F0
override def applicative = this
override def applicative: ResourceAsync[F] = this
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if it matters, but can this be:

Suggested change
override def applicative: ResourceAsync[F] = this
override def applicative: Async[Resource[F, *]] = this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typelevel/cats-effect/kernel/shared/src/main/scala/cats/effect/kernel/Resource.scala:1226:20: incompatible type in overriding
[error] override def applicative: cats.effect.kernel.ResourceAsync[F] (defined in class ResourceAsync);
[error]  found   : cats.effect.kernel.Async[[β$26$]cats.effect.kernel.Resource[F,β$26$]]
[error]  required: cats.effect.kernel.ResourceAsync[F]
[error]       override def applicative: Async[Resource[F, *]] = this
[error]                    ^
[error] one error found
[error] (Compile / compileIncremental) Compilation failed

🤔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I was surprised some of the other ones could use the more general type. 🤔

@armanbilge armanbilge merged commit f8126de into typelevel:series/3.x Sep 11, 2023
35 checks passed
@xuwei-k xuwei-k deleted the explicit-type branch October 8, 2023 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants